package com.qiyue.admin.entity.base.group;

import com.qiyue.admin.constant.AdminCommonConstant;
import com.qiyue.orm.jpa.model.BaseEntity;
import io.swagger.annotations.ApiModel;
import org.hibernate.validator.constraints.NotBlank;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by y747718944 on 2018/2/7
 */
@Entity
@Table(name = "base_group")
@ApiModel("角色 群组")
public class Group  extends BaseEntity{

    @Column(name = "code" , length = 16)
    private String code;

    @Column(name = "name" , length = 16)
    @NotBlank( message = "群组名不能为空")
    private String name;

    @Column(name = "parent_id" , length = 16)
    private Long parentId;

    @Column(name = "path" , length = 16)
    private String path;

    @Column(name = "type" , length = 16)
    private String type;

    @Column(name = "group_type" , length = 16)
    private Integer groupType = AdminCommonConstant.DEFAULT_GROUP_TYPE;

    @Column(name = "description" , length = 32)
    private String description;


    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }



    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Integer getGroupType() {
        return groupType;
    }

    public void setGroupType(Integer groupType) {
        this.groupType = groupType;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }
}
